package com.new4net.reactor;

import lombok.Data;

@Data
public abstract class Command implements Runnable{
    private String subjectName;

    private volatile Long startTime;

    private volatile Long endTime;
    @Override
    public  void run(){
        this.startTime=System.nanoTime();
        executeCommand();
        this.endTime = System.nanoTime();
    }

    protected abstract void executeCommand();

}
